﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo
{
    class Program
    {
        static void Main(string[] args)
        {
            //   *
            //  ***
            // *****
            //  ***
            //   *

            //边长是3
            //行列数就是5
            Console.WriteLine("请输入菱形边长:");
            int a = int.Parse(Console.ReadLine());
            int b = a - 1;
            for (int i = 0; i <= b; i++)
            {
                for (int j = 0; j <= b - i; j++)
                {
                    Console.Write(" ");
                }
                for (int j = 0; j <= 2 * i; j++)
                {
                    Console.Write("*");
                }
                Console.WriteLine();
            }
            for (int i = b; i >= 0; i--)
            {
                for (int j = 0; j <= b - i + 1; j++)
                {
                    Console.Write(" ");
                }
                for (int j = 0; j <= 2 * (i-1); j++)
                {
                    Console.Write("*");
                }
                Console.WriteLine();
            }
        }
    }
}
